﻿@using KPIS.GERP.Models.SYS.ViewModel
@model IEnumerable<SystemBehaviorVM>
@{
    ViewBag.Title = "System Error Log";
}

@if(Model == null || !Model.Any())
{
	@:Cannot load config System Behavior Vm
} else
{
	<div class="row-fluid">
		<div class="span12">
			<div id="accordion2" class="tabbable">
				<ul id="myTab" class="nav nav-tabs">
					@{
						int rowIndex = 0;
					}
					@foreach (var sb in Model)
					{
						 if(rowIndex == 0)
						 {
							 <li class="active">
								 <a href='@("#ErrorPan" + rowIndex)' data-toggle='tab'>@sb.Name </a>
							 </li>
						 } else
						 {
							 <li>
								 <a href='@("#ErrorPan" + rowIndex)' data-toggle='tab'>@sb.Name </a>
							 </li>
						 }
						rowIndex++;
					}
				</ul>
				<div class="tab-content">
					@{
						rowIndex = 0;
					}
					@foreach (var sb in Model)
					{
						<div id="ErrorPan@(rowIndex)" class="tab-pane @(rowIndex++ == 0 ? " in active" : string.Empty )">
							<iframe src="@(sb.ErrorLogSummaryUrl)" width="100%" height="12000px" scrolling="yes"></iframe>
						</div>
					}
				</div>
			</div>
		</div>
	</div>
}